package com.qjkji.orderproject.core.mapper;

import com.qjkji.orderproject.core.entity.OrderFood;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Repository
public interface StatisticsMapper {

    Integer selectNumberOfPeopleByDay(LocalDateTime dateTime);

    Integer selectNumberOfPeopleByYearWithMonth(@Param("time") LocalDateTime time);


    BigDecimal selectDecimalByDay(@Param("dateTime") LocalDateTime dateTime, @Param("paymentType") Integer paymentType);

    BigDecimal selectDecimalByYearWithMonth(@Param("time") LocalDateTime time, @Param("paymentType") Integer paymentType);


    List<OrderFood> selectBestFoodByYearWithMonth(@Param("time") LocalDateTime time);

    List<OrderFood> selectWorstFoodByYearWithMonth(@Param("time") LocalDateTime time);

}
